//
//  TabbarController.swift
//  TalkeTv
//
//  Created by lhf on 2024/10/18.
//

import UIKit

class TabbarController: UITabBarController,UITabBarControllerDelegate {

    override var childForStatusBarStyle: UIViewController? {
        return self.selectedViewController
    }
    
    // MARK: - 点击时触发
    func tabBarController(_ tabBarController: UITabBarController, shouldSelect viewController: UIViewController) -> Bool {
        return true
    }
    
    override func tabBar(_ tabBar: UITabBar, didSelect item: UITabBarItem) { }
    
    override func viewDidLoad() {
        super.viewDidLoad()
        self.delegate = self

        tabBar.backgroundColor = UIColor.white
        
        tabBar.items![0].image = UIImage.init(named: "home_normal")?.withRenderingMode(.alwaysOriginal)
        tabBar.items![0].selectedImage = UIImage.init(named: "home_selected")?.withRenderingMode(.alwaysOriginal)

        tabBar.items![1].image = UIImage.init(named: "mine_normal")?.withRenderingMode(.alwaysOriginal)
        tabBar.items![1].selectedImage = UIImage.init(named: "mine_selected")?.withRenderingMode(.alwaysOriginal)
        
        
        // Do any additional setup after loading the view.
    }
    

    /*
    // MARK: - Navigation

    // In a storyboard-based application, you will often want to do a little preparation before navigation
    override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
        // Get the new view controller using segue.destination.
        // Pass the selected object to the new view controller.
    }
    */

}
